package com.xjt.wx_admin.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.xjt.wx_admin.entity.dto.EditRemarkParam;
import com.xjt.wx_admin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    UserService userService;

    @GetMapping("/getUserList")
    public R getUserList(String name){
        return R.ok(userService.queryUserList(name));
    }


    @GetMapping("/searchUserList")
    public R searchUserList(String name){
        return R.ok(userService.searchUserList(name));
    }

    @PostMapping("/editRemark")
    public R editRemark(@RequestBody @Valid EditRemarkParam editRemarkParam){
        return userService.editRemark(editRemarkParam);
    }

}
